import {createRouter, createWebHistory} from 'vue-router';

const router = createRouter({
  history: createWebHistory(import.meta.env.BASE_URL),
  routes: [
    // 基本使用
    {
      path: '/basic-use',
      component: () => import('@/views/basic-use/BasicUse.vue'),
      children: [
        {
          path: 'children-a',
          component: () => import('@/views/basic-use/BasicUseChildrenA.vue'),
        },
        {
          path: 'children-b',
          component: () => import('@/views/basic-use/BasicUseChildrenB.vue'),
        },
      ]
    },
    
    // RouterView插槽
    {
      path: '/router-view-slot',
      component: () => import('@/views/router-view-slot/RouterViewSlot.vue'),
      children: [
        /* {
          path: 'children-a',
          component: () => import('@/views/basic-use/BasicUseChildrenA.vue'),
        },
        {
          path: 'children-b',
          component: () => import('@/views/basic-use/BasicUseChildrenB.vue'),
        }, */
      ]
    },
    
    // RouterLink扩展
    {
      path: '/router-view-extend',
      component: () => import('@/views/router-link-extend/RouterLinkExtend.vue'),
      children: [
        /* {
          path: 'children-a',
          component: () => import('@/views/basic-use/BasicUseChildrenA.vue'),
        },
        {
          path: 'children-b',
          component: () => import('@/views/basic-use/BasicUseChildrenB.vue'),
        }, */
      ]
    },
  ]
});

export default router;
